package com.lxw.report.engine.dataModel.column;

import com.lxw.report.engine.dataModel.report.ReportColumn;

import java.util.ArrayList;
import java.util.List;

/**
 * 报表树型列节点类
 */
public class ColumnTreeNode {
    private String value;
    /**
     * 父节点
     */
    private ColumnTreeNode parent;
    /**
     * 子节点集合
     */
    private  List<ColumnTreeNode> children = new ArrayList<>(0);
    /**
     * 在树结构中的深度
     */
    private int depth;
    /**
     * 如果要合并,合并的单元格数
     */
    private int spans;
    /**
     * 从根节点到当前节点的拼接路径值
     */
    private String path;
    /**
     * 当前节点所属的列信息
     */
    private ReportColumn column;

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public ColumnTreeNode getParent() {
        return parent;
    }

    public void setParent(ColumnTreeNode parent) {
        this.parent = parent;
    }

    public List<ColumnTreeNode> getChildren() {
        return children;
    }

    public int getDepth() {
        return depth;
    }

    public void setDepth(int depth) {
        this.depth = depth;
    }

    public int getSpans() {
        return spans;
    }

    public void setSpans(int spans) {
        this.spans = spans;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public ReportColumn getColumn() {
        return column;
    }

    public void setColumn(ReportColumn column) {
        this.column = column;
    }
}
